package com.cskaoyan.javase.oop1._7exercise._0lol;

/**
 * 完成以下案例，思考一下怎么能够找到程序中类、对象究竟是哪些？
 * 用面向对象的思想模拟LOL当中盖伦的战斗
 * 个体就是盖伦这个英雄
 * 抽象个体得出共性模板就是类
 * 显然这里的类是英雄类(Legend)
 *
 * @since 17:11
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        // 创建对象
        Legend le = new Legend("盖伦", "沉默", "护盾", "转圈圈", "大宝剑", 1000, 0, 500);
        le.fight();
    }
}

// 定义英雄类
class Legend {
    String name;
    String skillQ;
    String skillW;
    String skillE;
    String skillR;
    int hp;
    int mp;
    double money;

    // 行为
    public void fight() {
        System.out.println("名为" + name + "的英雄,正在" + skillR);
    }

    public Legend(String name, String skillQ, String skillW, String skillE, String skillR, int hp, int mp, double money) {
        this.name = name;
        this.skillQ = skillQ;
        this.skillW = skillW;
        this.skillE = skillE;
        this.skillR = skillR;
        this.hp = hp;
        this.mp = mp;
        this.money = money;
    }

    public Legend() {
    }
}
